<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- grid 宫格
     1.display: grid; 父盒子 -->
    <style>
        .box{
            width: 300px;
            height: 300px;
            box-sizing: border-box;
            display: grid;
            /* grid-template-rows: 1fr 1fr 1fr; */
            grid-template-rows: repeat(3,1fr);
            grid-template-columns: repeat(3,1fr);
            /* column-gap: 2px;
            row-gap: 2px; */
            /* gap:行 列 */
            gap: 1px 10px;
        }
        .inner{
            border: 1px solid #000;
            box-sizing: border-box;
            height: 100px;
            width: 100px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
        <div class="inner"></div>
    </div>
</body>
</html>